package com.ybox.auth.mapper;

import com.ybox.auth.form.RegisterBody;
import com.ybox.system.api.domain.SysUser;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * 会员对象映射
 * Created by macro on 2021/10/21.
 */
@Mapper
public interface RegisterBody2SysUserMapper {
    RegisterBody2SysUserMapper INSTANCE = Mappers.getMapper(RegisterBody2SysUserMapper.class);

    @Mapping(source = "username",target = "userName")
    SysUser toSysUser(RegisterBody registerBody);
}